﻿using System.Configuration;

namespace Hotpot.Configuration
{
    public class HotpotAssemblyConfigurationElementCollection : ConfigurationElementCollection
    {
        public override ConfigurationElementCollectionType CollectionType
        {
            get
            {
                return ConfigurationElementCollectionType.AddRemoveClearMap;
            }
        }

        protected override ConfigurationElement CreateNewElement()
        {
            return new HotpotAssemblyConfigurationElement();
        }

        protected override ConfigurationElement CreateNewElement(string elementName)
        {
            return new HotpotAssemblyConfigurationElement(elementName);
        }

        protected new HotpotAssemblyConfigurationElement BaseGet(int index)
        {
            return (HotpotAssemblyConfigurationElement)base.BaseGet(index);
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((HotpotAssemblyConfigurationElement)element).Assembly;
        }
    }
}
